module Tools

open Newtonsoft.Json
open System.IO

let deserialize<'a> (file: string) =
  let read = File.ReadAllText >> JsonConvert.DeserializeObject<'a>
  if File.Exists file then read file |> Some else None